package basedemo

def log(x, y=10){  //可选参数
    Math.round(x)/Math.round(y)
}
println log(5)  //不传默认为10
println log(5,20)

def task(name,String[] details){ //groovy会把末尾的数组形参当做可选的
    println "$name-$details"
}
task "hou","yao","he","li"
task "zhou"
